package com.catmai.pssmanager.dao.impl;

import java.sql.SQLException;
import java.util.List;

import com.catmai.pssmanager.dao.GoodsAndAreaDao;
import com.catmai.pssmanager.po.GoodsAndArea;

public class GoodsAndAreaDaoImpl extends BasicDaoImpl<GoodsAndArea> implements GoodsAndAreaDao {

	@Override
	public List<GoodsAndArea> findAll() throws SQLException {
		String sql = "select g.goods_id,g.goods_name,g.lastChange_date,g.goods_number,s.storehouse_address,x.store_area FROM goods g,storehouse s,storearea x WHERE g.store_area_id=x.storearea_id and x.store_house_id=s.storehouse_id";
		return this.getList(connection, sql);
	}

}
